<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .tr-enter{opacity:0}
        .tr-enter-active{
            transition: all 6s;
        }
        .tr-enter-to{
            opacity: 1;
            font-size: 50px;
        }
    </style>
</head>
<body>
     <script src="vue.js"></script>
     <div id="app">
        <button @click="show=true">出现<button>
        <button @click="show=false">消失<button>
        <transition name="tr">
            <div id="box">vue动画</div>
        </transition>
      </div>
     
      <script>
        var vm=new Vue({
            el:"#app",
            data:{
                show:true
            }
        })
      </script>
  
</body>
</html>